#include "transMessage.h"
int transUserinfo(int sockfd, train_t *train, userinfo_t *userinfo)
{
    train->flag = ISLOGIN;
    train->length = sizeof(userinfo_t);
    memcpy(train->data, userinfo, sizeof(userinfo_t));
    /* printf("%d\n",cmd->cmdType);
    printf("%d  \n", train->length);
    printf("%d\n", train->flag); */
    int ret = send(sockfd, train, sizeof(train_t), 0);
    ERROR_CHECK(ret, -1, "send in transCommand");
    return 0;
}